<?php

namespace app\index\api;

use api\store\StoreApi;

class Test extends StoreApi
{
    protected $data_name = 'test';

    public function search_name()
    {
        $page = input('page');//获得分页
        $str = input('str');//获得搜索的关键词
        $key = input('key', 'name');
        $data = $this->store->select($str, $key, true)->page($page);
        return $this->success($data);
    }
}